import numpy as np

A = np.arange(1,17).reshape(4,4)
print(A)
print(A[2,1])

B = np.sum(A[1:4,1:4]) - A[2,1:2]   # numpy可对切片求和



